*********** List of class ltraj ***********
Type of the traject: Type II (time recorded)
* Time zone unspecified: dates printed in user time zone *
Irregular traject. Variable time lag between two locs
Characteristics of the bursts:
id burst nb.reloc NAs date.begin date.end
1 d16241y2011 d16241y2011 1486 0 2011-05-01 00:02:37 2011-05-31 23:32:39
2 d16243y2011 d16243y2011 1480 0 2011-05-01 00:02:40 2011-05-31 23:32:37
3 d16244y2011 d16244y2011 1474 0 2011-05-01 00:02:36 2011-05-31 23:32:39
4 d16246y2011 d16246y2011 1481 0 2011-05-01 00:02:36 2011-05-31 23:32:40
5 d16247y2011 d16247y2011 1482 0 2011-05-01 00:02:37 2011-05-31 23:32:40
6 d16250y2011 d16250y2011 1474 0 2011-05-01 00:02:37 2011-05-31 23:32:37
7 d16252y2011 d16252y2011 1487 0 2011-05-01 00:02:40 2011-05-31 23:32:36
8 d16253y2011 d16253y2011 1473 0 2011-05-01 00:02:40 2011-05-31 23:32:36
infolocs provided. The following variables are available:
[1] "PDOP" "ACTIVITY"
Recap 1: Tracking Data in adehabitatLT
Installing Packages
Use ‘install.packages(’PackageName’) to install a package
Need to call library(PackageName) in every R session
deer_utm$POSIX <-as.POSIXct(deer_utm$date1)deer_ltraj <-as.ltraj(xy=deer_utm[,c('X','Y')], date = deer_utm$POSIX,id = deer_utm$ID, infolocs=deer_utm[,c('PDOP','ACTIVITY')],proj4string =CRS("+init=epsg:3158"))deer_ltraj
*********** List of class ltraj ***********
Type of the traject: Type II (time recorded)
* Time zone unspecified: dates printed in user time zone *
Irregular traject. Variable time lag between two locs
Characteristics of the bursts:
id burst nb.reloc NAs date.begin date.end
1 d16241y2011 d16241y2011 1486 0 2011-05-01 00:02:37 2011-05-31 23:32:39
2 d16243y2011 d16243y2011 1480 0 2011-05-01 00:02:40 2011-05-31 23:32:37
3 d16244y2011 d16244y2011 1474 0 2011-05-01 00:02:36 2011-05-31 23:32:39
4 d16246y2011 d16246y2011 1481 0 2011-05-01 00:02:36 2011-05-31 23:32:40
5 d16247y2011 d16247y2011 1482 0 2011-05-01 00:02:37 2011-05-31 23:32:40
6 d16250y2011 d16250y2011 1474 0 2011-05-01 00:02:37 2011-05-31 23:32:37
7 d16252y2011 d16252y2011 1487 0 2011-05-01 00:02:40 2011-05-31 23:32:36
8 d16253y2011 d16253y2011 1473 0 2011-05-01 00:02:40 2011-05-31 23:32:36
infolocs provided. The following variables are available:
[1] "PDOP" "ACTIVITY"
Visualizing Wildlife Tracking Data
adehabitatLT package
default plots are IMO terrible
automatically plot all individuals in seperate tile
#need to regularize the track for animation - here we have ~30 minute datam <-align_move(deer_move, res =30, unit ="mins")# create spatial frames with a OpenStreetMap mapframes <-frames_spatial(m, map_service ="osm", map_type ="topographic") %>%add_northarrow() %>%add_scalebar() %>%add_timestamps(type ="label") %>%add_progress()
Checking temporal alignment...
Processing movement data...
Approximated animation duration: ≈ 59.48s at 25 fps for 1487 frames
Retrieving and compositing basemap imagery...
Assigning raster maps to frames...
Creating frames...
Look at One Frame
frames[[100]] # preview one of the frames, e.g. the 100th frame
# animate frames takes 30 minutes for a 1 minute video (1487 frames)#animate_frames(frames, out_file = "moveVis.gif")
step-characteristics associated with first fix (dist, dt, abs.angle)
NA values in last row (n fixes -> n-1 steps)
turning angle associated with middle of three fixes (rel.angle)
NA values in first and last row (n-1 steps -> n-2 turns)
Accessing Movement Metrics
Convert back to data.frame
library(ggplot2)deerdf <-ld(deer_ltraj)ggplot(deerdf, aes(x = dist, fill = id)) +geom_histogram(position="identity",alpha=0.2,bins=50) +scale_x_continuous(trans='log')
Movement Step Velocities
deerdf$vi <- deerdf$dist / deerdf$dt #step velocity in m/sdeer_ltraj <-dl(deerdf) #convert back to ltrajggplot(deerdf, aes(x=id, y = vi)) +geom_boxplot() +scale_y_continuous(trans='log')
Net-Displacement
Net (not cumulative) distance from origin point
often ‘First Fix’
Sometimes use \(\sqrt{nD}\) (squared-net displacement)